package cn.edu.scau.cmi.dengyu.abstractFactory.factory;

import cn.edu.scau.cmi.dengyu.domain.factory.Accident;
import cn.edu.scau.cmi.dengyu.domain.factory.CarDamagedInPICC;
import cn.edu.scau.cmi.dengyu.domain.factory.DriverInjuredInPICC;
import cn.edu.scau.cmi.dengyu.domain.factory.MultipleAccidentsInPICC;
import cn.edu.scau.cmi.dengyu.domain.factory.PeopleInjuredInPICC;

public class PICCFactory extends AbstractFactory{
	public Accident getAccident(String type) {
		switch (type) {
		case "司机受伤":
			return new DriverInjuredInPICC();
		case "汽车损坏":
			return new CarDamagedInPICC();
		case "人员伤亡":
			return new PeopleInjuredInPICC();
		case "多种事故":
			return new MultipleAccidentsInPICC();
		}
		return null;

	}
}
